/*
 * author      : dormi330 
 * date        : 2018/7/20
 * description : 输入导致的错误, 非系统错误
 * 对应 http code 400~499
 */

package com.deep.trade.application.exception;

import com.deep.trade.common.TradeException;
import org.springframework.http.HttpStatus;

public class LayerControllerException extends TradeException {

    public LayerControllerException(int code, String msg) {
        super(code, msg);
    }

    /** 没有指定的参数 */
    public static LayerControllerException argumentNotFound(String argName) {
        return new LayerControllerException(HttpStatus.BAD_REQUEST.value(), "找不到指定的参数:" + argName);
    }

    /** 指定的参数值无效 */
    public static LayerControllerException argumentInvalid(String argName) {
        return new LayerControllerException(HttpStatus.BAD_REQUEST.value(), "无效的参数:" + argName);
    }
}
